const base = require('./webpack.common');
// 合并webpack配置项
const { merge } = require('webpack-merge');

const path = require('path');

const devConfig = {
  mode: 'development',
  output: {
    filename: 'dev_bundle.js',
    path: path.join(__dirname, 'dist')
  },
  devServer: {
    contentBase: path.join(__dirname, 'dist'),
    port: 8080,
  },
  plugins:[
    new webpack.HotModuleReplacementPlugin(), //启用热替换模块
]
};

module.exports = merge(base, devConfig);

